'''
Created on Mar 9, 2012

@author: kishy
'''

from data.CheckIn import check_in
from data.CheckOut import check_out
from data.QueryUsers import query_users

def main () :

    retVal = check_out("kishy")

    for item in query_users() :
        print "Item id: %d UserName %s" % (item.userId, item.userName)

    if (retVal) :
        print "checked out"
    else :
        print "Not checked out"

    check_in("kishy", "My name is K", "COOKIE")
    check_in("kumar", "My name is M", "COOKIE1")

    for item in query_users() :
        print "Item id: %d UserName %s" % (item.userId, item.userName)

    retVal = check_out("kishy")
    if (retVal) :
        print "checked out"
    else :
        print "Not checked out"

    #for item in globalActiveUserList :
    #       print "Item id: %d UserName %s" % (item.userId, item.userName)

    for item in query_users() :
        print "Item id: %d UserName %s" % (item.userId, item.userName)

    return

if __name__ == '__main__':
    main()
